package com.example.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author John123
 * @since 2018-08-27
 */
@TableName("t_user")
@Data
public class TUser extends Model<TUser> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 账号
     */
    private String username;
    /**
     * 密码（加密）
     */
    private String password;
    /**
     * 员工姓名
     */
    private String realname;
    /**
     * 用户的微信ID
     */
    private String weixin;
    /**
     * 用户的创建时间
     */
    private Date createtime;
    /**
     * 是否可用
     */
    private Integer enable;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "TUser{" +
        "id=" + id +
        ", username=" + username +
        ", password=" + password +
        ", realname=" + realname +
        ", weixin=" + weixin +
        ", createtime=" + createtime +
        ", enable=" + enable +
        "}";
    }
}
